<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>任务管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						if ($("#link").val()) {
							$('#linkBody').show();
							$('#url').attr("checked", true);
						}
						$("#title").focus();
						$("#inputForm")
								.validate(
										{
											submitHandler : function(form) {
												if ($("#categoryId").val() == "") {
													$("#categoryName").focus();
													top.$.jBox.tip('请选择归属栏目',
															'warning');
												} else if (CKEDITOR.instances.content
														.getData() == ""
														&& $("#link").val()
																.trim() == "") {
													top.$.jBox.tip('请填写正文',
															'warning');
												} else {
													loading('正在提交，请稍等...');
													form.submit();
												}
											},
											errorContainer : "#messageBox",
											errorPlacement : function(error,
													element) {
												$("#messageBox").text(
														"输入有误，请先更正。");
												if (element.is(":checkbox")
														|| element.is(":radio")
														|| element
																.parent()
																.is(
																		".input-append")) {
													error.appendTo(element
															.parent().parent());
												} else {
													error.insertAfter(element);
												}
											}
										});
					});
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/cms/taskOperation/">任务列表</a></li>
		<li class="active"><a
			href="<c:url value='${fns:getAdminPath()}/cms/taskOperation/form?id=${taskOperation.id}&keyfield=${taskOperation.keyfield}'></c:url>">任务${not empty taskOperation.id?'修改':'添加'}查看</a></li>
	</ul>
	<br />
	<form:form id="inputForm" modelAttribute="taskOperation"
		action="${ctx}/cms/taskOperation/save" method="post" class="form-horizontal">
		<form:hidden path="id" />
		<sys:message content="${message}" />

		<div class="control-group">
			<label class="control-label">关键字段:</label>
			<div class="controls">
				<form:input path="keyfield" htmlEscape="false" maxlength="200"
					class="input-xlarge" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产品id:</label>
			<div class="controls">
				<form:input path="productid" htmlEscape="false" maxlength="200"
					class="input-xlarge"  disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产品名称:</label>
			<div class="controls">
				<form:input path="productname" htmlEscape="false" maxlength="200"
					class="input-xlarge" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">子任务:</label>
			<div class="controls">
				<form:input path="dptask" htmlEscape="false" maxlength="200"
					class="input-xlarge" disabled="true"/>
			</div>
		</div>
		<div class="control-group">

			<label class="control-label">归属部门:</label>
			<div class="controls">
				<form:input path="dept" htmlEscape="false" maxlength="200"
					class="input-xlarge" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">计划任务日期:</label>
			<div class="controls">
				<input id="pdate" name="pdate" type="text" readonly="readonly"
					maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${taskOperation.pdate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产值a:</label>
			<div class="controls">
				<form:input path="a" htmlEscape="false" maxlength="200"
					class="input-xlarge" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产值b:</label>
			<div class="controls">
				<form:input path="b" htmlEscape="false" maxlength="200"
					class="input-xlarge" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产值c:</label>
			<div class="controls">
				<form:input path="c" htmlEscape="false" maxlength="200"
					class="input-xlarge" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产值d:</label>
			<div class="controls">
				<form:input path="d" htmlEscape="false" maxlength="200"
					class="input-xlarge" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产值e:</label>
			<div class="controls">
				<form:input path="e" htmlEscape="false" maxlength="200"
					class="input-xlarge" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产值f:</label>
			<div class="controls">
				<form:input path="f" htmlEscape="false" maxlength="200"
					class="input-xlarge" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产值g:</label>
			<div class="controls">
				<form:input path="g" htmlEscape="false" maxlength="200"
					class="input-xlarge" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产值h:</label>
			<div class="controls">
				<form:input path="h" htmlEscape="false" maxlength="200"
					class="input-xlarge" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">任务类型:</label>
			<div class="controls">
				<form:input path="tasktype" htmlEscape="false" maxlength="200"  value="B"
					class="input-xlarge" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否完工:</label>
			<div class="controls">
				<form:radiobuttons path="istaskcomplete"
					items="${fns:getDictList('yes_no')}" itemLabel="label"
					itemValue="value" htmlEscape="false" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否标志工序:</label>
			<div class="controls">
				<form:radiobuttons path="istagprocess"
					items="${fns:getDictList('yes_no')}" itemLabel="label"
					itemValue="value" htmlEscape="false" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否工段完成:</label>
			<div class="controls">
				<form:radiobuttons path="ispartcomplete"
					items="${fns:getDictList('yes_no')}" itemLabel="label"
					itemValue="value" htmlEscape="false" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否检验工序:</label>
			<div class="controls">
				<form:radiobuttons path="isqctask"
					items="${fns:getDictList('yes_no')}" itemLabel="label"
					itemValue="value" htmlEscape="false" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否合格:</label>
			<div class="controls">
				<form:radiobuttons path="isok" items="${fns:getDictList('yes_no')}"
					itemLabel="label" itemValue="value" htmlEscape="false" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否开工:</label>
			<div class="controls">
				<form:radiobuttons path="isstart"
					items="${fns:getDictList('yes_no')}" itemLabel="label"
					itemValue="value" htmlEscape="false" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">用户id:</label>
			<div class="controls">
				<form:input path="userid" htmlEscape="false" maxlength="200"
					class="input-xlarge" disabled="true"/>
			</div>
		</div>

		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="submit"
				value="保 存" />&nbsp; <input id="btnCancel" class="btn" type="button"
				value="返 回" onclick="history.go(-1)" />
		</div>
	</form:form>
</body>
</html>